//
//  MYXLabelViewCell.m
//  meiyinxiang
//
//  Created by 陈李飞 on 2017/11/7.
//  Copyright © 2017年 hbjApple. All rights reserved.
//

#import "MYXLabelViewCell.h"




@interface MYXLabelViewCell()

@property (copy, nonatomic)NSArray* colors;
@property (copy, nonatomic)NSArray* fonts;
@property (copy, nonatomic)NSArray* tags;
@end

@implementation MYXLabelViewCell
#pragma mark - init
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
       
       
    }
    return self;
}

-(void)setTypes:(NSString *)types{
    _types = types;
    if ([types isEqualToString:@"1"]) {
        _colors = @[[UIColor colorWithRed:0 green:0.63 blue:0.8 alpha:1]];
        _fonts = @[[UIFont systemFontOfSize:13]];
         _tags = @[@"养宠物", @"运动健身", @"旅游美食"];
    }else{
        _colors = @[[UIColor colorWithRed:0 green:0.63 blue:0.8 alpha:1], [UIColor colorWithRed:1 green:0.2 blue:0.31 alpha:1], [UIColor colorWithRed:0.53 green:0.78 blue:0 alpha:1],[UIColor colorWithRed:0.80f green:0.04f blue:0.00f alpha:1.00f],[UIColor colorWithRed:0.04f green:0.76f blue:0.68f alpha:1.00f]];
        _fonts = @[[UIFont systemFontOfSize:12], [UIFont systemFontOfSize:16], [UIFont systemFontOfSize:20]];
        
        _tags = @[@"养宠物", @"运动健身", @"旅游美食", @"育婴", @"电影追剧", @"资源共享", @"摄影", @"赛车"];
        
    }
    
    //初始化
    _tagCloud = [[WWTagsCloudView alloc] initWithFrame:CGRectMake(0, 0, WIDTH, 150)
                                               andTags:_tags
                                          andTagColors:_colors
                                              andFonts:_fonts
                                       andParallaxRate:1.7
                                          andNumOfLine:3 Label:types];
    
    [self addSubview:_tagCloud];
}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
